package snapex.core.fallback;

import com.fasterxml.jackson.databind.ObjectMapper;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

@Data @RequiredArgsConstructor @AllArgsConstructor
public class FallbackResponse {
	private static final ObjectMapper MAPPER = new ObjectMapper();
	
	@NonNull
	private int code;
		
	private String msg;
	
	public String toJsonString() {
		String json = "";
		try {
			json = MAPPER.writeValueAsString(this);
		}
		catch(Exception ignored) {
			
		}
		return json;
	}
}
